home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 75 / XENIATGM75.iso / Shareware / X-Setup 5.0 / _SETUP.1 / XQ Shortcut 3.xpl < prev    next >
Text File  |  1999-06-11  |  2KB  |  77 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 3.1"
  2. "TYPE"="6"
  3. "COUNT"="2"
  4. "UIPATH"="Appearance\Explorer\Shortcuts"
  5. "NAME"="Extension"
  6. "LANGUAGE"="VBScript"
  7. "TEXT 1"="Always display extension for Links (*.LNK)"
  8. "TEXT 2"="Always display extension for *.PIF files"
  9. "DESCRIPTION 1"="By default, Windows does never display the extension for LNK and PIF files."
  10. "DESCRIPTION 2"="By activating this options here, you can force Windows to display the extensions."
  11. "AUTHOR"="Xteq Systems"
  12. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  13. "COMMENT 1"="For more information, go to http://www.xteq.com or write to info@xteq.com."
  14. "COMMENT 2"="Version 1.11"
  15.  
  16.  
  17.  
  18. Sub Plugin_Initialize 
  19.  s=RegReadValue("HKCR\Lnkfile\NeverShowExt")
  20.  if IsEmpty(s)=true then
  21.   SetUIElement 1,true
  22.  end if
  23.  
  24.  s=RegReadValue("HKCR\piffile\NeverShowExt")
  25.  if IsEmpty(s)=true then
  26.   SetUIElement 2,true
  27.  end if
  28. End Sub
  29.  
  30. Sub Plugin_CheckData(ElementIndex)
  31. End Sub
  32.  
  33. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  34.  b=GetUIElement(1)
  35.  if b=true then
  36.   Call SwitchMode("LnkFile",true)
  37.  else
  38.   Call SwitchMode("LnkFile",false)
  39.  end if
  40.  
  41.  b=GetUIElement(2)
  42.  if b=true then
  43.   Call SwitchMode("piffile",true)
  44.  else
  45.   Call SwitchMode("piffile",false)
  46.  end if
  47.  
  48.  Restart
  49. End Sub
  50.  
  51. Sub SwitchMode(fn,show)
  52.  s=RegReadValue("HKCR\" & fn & "\NeverShowExt")
  53.  if IsEmpty(s)=false then
  54.     Call RegDeleteValue("HKCR\" & fn & "\NeverShowExt")
  55.  end if
  56.  
  57.  s=RegReadValue("HKCR\" & fn & "\AlwaysShowExt")
  58.  if IsEmpty(s)=false then
  59.     Call RegDeleteValue("HKCR\" & fn & "\AlwaysShowExt")
  60.  end if
  61.  
  62.  
  63.  if show=true then
  64.   Call RegWriteValue("HKCR\" & fn & "\AlwaysShowExt","",1)
  65.  else
  66.   Call RegWriteValue("HKCR\" & fn & "\NeverShowExt","",1)
  67.  end if
  68.  
  69. End Sub
  70.  
  71.  
  72. Sub Plugin_Terminate 
  73. End Sub
  74.  
  75.  
  76.  
  77.